<template>
  <Banner></Banner>
  <posts-list :list="data"></posts-list>
</template>
<script setup lang="ts">
import Banner from "~/application/home/banner.vue";
import PostsList from "~/application/home/postsList.vue";
import {fetchGetPostList} from "~/api/post";
import {IPostListParams} from "~/api/post/types";
import {onMounted, Ref, ref} from "vue"
import data from "./data.json"

const params: Ref<IPostListParams> = ref({
  page_number: 1,
  page_size: 10,
  title: "",
  sort: "1"
})
const handleGetList = async () => {
  const res = await fetchGetPostList(params.value)
}
onMounted(() => {
  handleGetList()
})
</script>

<style scoped>

</style>
